package com.task.core.service;

import java.util.List;

import com.task.common.domain.info.KeyAndValue;
import com.task.core.domain.DatasourceInfo;
import com.task.core.domain.info.DataContentInfo;
import com.task.core.domain.info.DatasourceInfoOptionInfo;
import com.task.core.domain.info.RelationMissionSourceInfo;
import com.task.core.dto.request.DatasourceOptionRequestDTO;
import com.task.core.dto.request.DatasourceRequestDTO;
import com.task.core.dto.response.DataContentInfoResposeDTO;
import com.task.core.vo.resp.DatasourceDetailRespVo;

/**
 * @author 迪迦.
 * @date 2024/11/4 17:23
 */
public interface DatasourceService {

  List<DatasourceInfo> getDatasourceByPage(DatasourceRequestDTO request);

  List<KeyAndValue> getDatasourceForOption(DatasourceRequestDTO request);

  void addDatasource(DatasourceRequestDTO request);

  void modifyDatasource(DatasourceRequestDTO request);

  void deleteDatasource(String datasourceCode, Long userId);

  DatasourceInfo getDataSourceByCode(String dataSourceCode);

  List<DatasourceInfo> getDataSourceByCodes(List<String> codes);

  void updateDataCount(Integer intValue, String dataSourceCode);

  void updateDataCountDecrement(String datasourceCode, Integer deleteCount);

  void deleteDatasourceByMissionCode(String missionCode);

  void addSourceByMissionCode(List<RelationMissionSourceInfo> sourceInfos);

  List<DatasourceInfoOptionInfo> getDatasourceForOptionByMission(DatasourceOptionRequestDTO request);

    List<DatasourceInfo> getAllDataSource(DatasourceOptionRequestDTO request);

  void clearDatasource(String datasourceCode);

  DataContentInfoResposeDTO showDatasource(String datasourceCode);

    DatasourceDetailRespVo getDataSoucreDetail(String dataSourceCode);

  List<DatasourceInfoOptionInfo> getDatasourceForOptionByMissionCode(DatasourceOptionRequestDTO request);
}
